/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dis.dao;

import java.sql.Statement;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;

import java.sql.ResultSet;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import dis.service.ServiceConnect;

/**
 *
 * @author Manuel
 */
public abstract class DAOGeneral <T> {
    
    protected Connection conection = conectar();
    protected Statement stmnt;
    protected ResultSet result;
    
    
    public Connection conectar(){
        try{
            ServiceConnect service =  new ServiceConnect();
            return service.connect();
        }
        catch(Exception ex){
            return null;
        }
        
    }
    public abstract void insertar(T objeto);
    public abstract void borrar(String condicion);
    public abstract void actualizar (T objeto, String condicion);
    public abstract List<T> buscar(String valor, String criterio );

}
